module.exports = {
  set sessionId(sessionId){
      uni.setStorageSync('sessionId', sessionId) 
  },
  get sessionId() {
      return uni.getStorageSync('sessionId')
  },

  set information(val) {
    uni.setStorageSync('information', val)
  },
  get information() {
    return uni.getStorageSync('information')
  },

  get deviceIdOfLastMeasurement() {
    return uni.getStorageSync('deviceIdOfLastMeasurement')
  },
  set deviceIdOfLastMeasurement(val) {
    uni.setStorageSync("deviceIdOfLastMeasurement", val)
  },

  get deviceDecimal() {    
  var dd= uni.getStorageSync('deviceDecimal');
    if(!dd){
      dd=1;
    }
    var intdd = parseInt(dd);  //小数位
    return intdd;
  },
  set deviceDecimal(val) {
    uni.setStorageSync("deviceDecimal", val)
  },

    get deviceUnit() {
      var dd = uni.getStorageSync('deviceUnit');
    if (!dd) {
      dd = "Kg";
    }
     //单位
      return dd;
  },
  set deviceUnit(val) {
    uni.setStorageSync("deviceUnit", val)
  },

  
  get isClickLogin() {
    var star = uni.getStorageSync("isClickLogin");
   
    return star;
  },

  set isClickLogin(val) {
    uni.setStorageSync("isClickLogin", val)
  },

  get currentOrganID()
   {
     return uni.getStorageSync("OrganID"); 
   },
   set currentOrganID(val) {
    uni.setStorageSync("OrganID", val)
  },

// 选择的星球
  get starSetting(){
    var star = uni.getStorageSync("starSet");
    if (!star){
      return { star: '地球', coefficient: 1, image: '/pages/starimg/earth.png' };
    }
    return star;
  },

  set starSetting(val) {
    uni.setStorageSync("starSet", val)
  },

  
  get currentFatData() {
    var star = uni.getStorageSync("currentFatData");
   
    return star;
  },

  set currentFatData(val) {
    uni.setStorageSync("currentFatData", val)
  },

  
  get currentPunch() {
    var star = uni.getStorageSync("currentPunch");
   
    return star;
  },

  set currentPunch(val) {
    uni.setStorageSync("currentPunch", val)
  },

  get loginstate() {
    var star = uni.getStorageSync("loginstate");

    return star;
  },

  set loginstate(val) {
    uni.setStorageSync("loginstate", val)
  },
  

  set currentUser(val){
    uni.setStorageSync("currentUser",val)
  },
  get currentUser() {
    var user = uni.getStorageSync("currentUser");
    return user;
  },


  
  set personSign(val){
    uni.setStorageSync("personSign",val
       
    )
  },

  get personSign() {
    var user = uni.getStorageSync("personSign");
    return user;
  },
  
 
  



}